package com.lizhen.behaviorpattern.interpreterpattern.impl;

import com.lizhen.behaviorpattern.interpreterpattern.Expression;

public class TerminalExpression implements Expression {
    private String data;

    public TerminalExpression(String data) {
        this.data = data;
    }

    public boolean interpret(String context) {
        return context.contains(this.data);
    }
}
